package cn.gyx.hrm.feign.client;

import cn.gyx.hrm.domain.Login;
import cn.gyx.hrm.dto.LoginAndMealDto;
import cn.gyx.hrm.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

// feign客户端接口
@FeignClient(value = "service-auth",fallbackFactory = LoginFeignClientFallBack.class)
@RequestMapping("/login")
public interface LoginFeignClient {
    //保存一个登录
    @RequestMapping(value="/save",method= RequestMethod.POST)
    AjaxResult save(@RequestBody Login login);

    // 保存登录和套餐
    @RequestMapping(value="/saveLoginAndMealId",method= RequestMethod.POST)
    AjaxResult saveLoginAndMealId(@RequestBody LoginAndMealDto loginAndMealDto);
}
